const { defineConfig } = require('@vue/cli-service')

let proxyObj = {} // 代理对象

proxyObj['/'] = {
  // websocket
  ws: false,
  // 代理目标地址
  target: 'http://localhost:9999/magic/web',
  // 发送请求头 host 会被设置 target
  changeOrigin: true,
  // 不重写请求地址
  pathRewrite: {
    '^/': '/'
  }
}

module.exports = defineConfig({
  transpileDependencies: true,
  assetsDir: "src/assets",
  publicPath: './',
  devServer:{
    host:'localhost',
    port:8888,
    proxy:proxyObj
  },
})